package auctionhaus

class LoginTagLib {
    def loginLogout = {
        if(session.customer != null){
            out << """Logged in as: ${session.customer.emailAddress} | """
            out << """${link(action:"logout", controller:"login"){"Logout"}}"""
        } else {
            out << """${link(action:"login", controller:"login"){"Login"}} | """
            out << """${link(action:"create", controller:"customer"){"Register"}}"""
        }
    }
}
